package spring.bean.condition;

import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * Created by kassadin@foxmail.com on 2017/4/24 0024.
 */
@Configuration
@PropertySource("classpath:app.properties")

public class MagicConfig {

    @Bean
    @Conditional(MagicCondition.class)
    public String getMagic() {
        return "Has Magic";
    }
}
